from django.urls import path
from .views import *

urlpatterns = [

    # 流程管理
    path('flows/', FlowView.as_view({'get':'flowshow','post':'add_flow'})),
    path('flow/<int:pk>/', FlowView.as_view({'get':'flow_desc','delete':'del_flow'})),
    # 获取部门下的职位
    path('stations/', FlowView.as_view({'get':'section_desc'})),

    # 获取历史审批记录
    path('historys/', HistoryView.as_view({'get':'historyshow','post':'add_history'})),
    # 获取详情
    path('history/<int:pk>/', HistoryView.as_view({'get':'history_desc'})),
    path('node_type/', HistoryView.as_view({'get':'node_type'})),
    # 获取该用户审批的结点实例
    path('approval/', HistoryView.as_view({'get':'approvalshow'})),

    # 同意审批
    path('approval/<int:pk>/', ApprovalView.as_view({'put':'approval_consent'})),
    # 不同意审批
    path('approvals/<int:pk>/', ApprovalView.as_view({'put':'approval_dissent'})),

]